/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ua_gov_energy_vkek_icelineacct.model;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author moroz
 */
@Entity
@Table(name = "v_app_raw_users")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "User.findByLogin", query = "SELECT v FROM User v WHERE v.login = :login"),
    @NamedQuery(name = "User.findByEnabled", query = "SELECT v FROM User v WHERE v.enabled = :enabled"),
    @NamedQuery(name = "User.findByFirstName", query = "SELECT v FROM User v WHERE v.firstName = :firstName"),
    @NamedQuery(name = "User.findByGroup", query = "SELECT v FROM User v WHERE v.userGroup = :group"),})
public class User implements Serializable {

    
    //--
    @Id
    @Column(name = "id_user")
    private Integer idUser;
    //--
    @Column(name = "login")
    private String login;
    //--
    @Column(name = "enabled",length =1)
    private String enabled;
    //--
    @Column(name = "first_name")
    private String firstName;
    //--
    @Column(name = "second_name")
    private String secondName;
    //--
    @Column(name = "last_name")
    private String lastName;
    //--
    @Column(name = "usergroup")
    private String userGroup;
    //--
    @Column(name = "pass")
    private String pass;

    public User() {
    }

    public User(String login){
        this.login=login;
    }
    public Integer getIdUser() {
        return idUser;
    }

    public void setIdUser(Integer idUser) {
        this.idUser = idUser;
    }

    public String getLogin() {
        return login;
    }

    public void setLogin(String login) {
        this.login = login;
    }

    public String getEnabled() {
        return enabled;
    }

    public void setEnabled(String enabled) {
        this.enabled = enabled;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getSecondName() {
        return secondName;
    }

    public void setSecondName(String secondName) {
        this.secondName = secondName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public String getUserGroup() {
        return userGroup;
    }

    public void setUserGroup(String userGroup) {
        this.userGroup =userGroup;
    }

    public String getPass() {
        return "***";
    }

    public void setPass(String pass) {
        this.pass = pass;
    }
}
